//
//  MajorButtonView.m
//  GKZYAid
//
//  Created by tony on 16/3/3.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "MajorButtonView.h"
#import "MyDefine.h"

@interface MajorButtonView ()

@property(nonatomic,strong)UILabel *titleLab;
@property(nonatomic,strong)UILabel *markLab;

@end

@implementation MajorButtonView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addViews];
    }
    return self;
}

-(void)addViews{
    self.titleLab = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, VIEWWIDTH, VIEWHEIGHT*0.95)];
    self.titleLab.backgroundColor = [UIColor clearColor];
    self.titleLab.textAlignment = NSTextAlignmentCenter;
    self.titleLab.userInteractionEnabled = YES;
    [self addSubview:self.titleLab];
    
    self.markLab = [[UILabel alloc]initWithFrame:CGRectMake(VIEWWIDTH/4, VIEWHEIGHT*0.95, VIEWWIDTH/2, VIEWHEIGHT*0.05-0.2)];
    self.markLab.userInteractionEnabled = YES;
    [self addSubview:self.markLab];
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.markLab.frame), VIEWWIDTH, 0.5)];
    label.backgroundColor = [UIColor colorWithWhite:0.1 alpha:0.2];
    [self addSubview:label];
    
}

-(void)setTheTitle:(NSString *)title{

    self.titleLab.text = title;

}

-(void)setTheTitleColor:(UIColor *)titleColor andMarkColor:(UIColor *)markColor{

    self.titleLab.textColor = titleColor;
    self.markLab.backgroundColor = markColor;

}



@end
